var express = require('express');
var router = express.Router();
var api = require("../module/team")

/*查询组织*/
router.post('/find_team_info', function (req, res, next) {
    api.find_team_info(req, res, next)
});

/*新增部门*/
router.post('/add_department', function (req, res, next) {
    api.add_department(req, res, next)
});

// /*新增部门*/
// router.post('/add_department', function (req, res, next) {
//     api.add_department(req, res, next)
// });

/*编辑部门*/
router.post('/update_department', function (req, res, next) {
    api.update_department(req, res, next)
});
/*查询部门*/
router.post('/find_department', function (req, res, next) {
    api.find_department(req, res, next)
});
/*删除部门*/
router.post('/delete_department', function (req, res, next) {
    api.delete_department(req, res, next)
});
/*获取组织邀请参数*/
router.post('/get_invitation_link', function (req, res, next) {
    api.get_invitation_link(req, res, next)
});
/*通过邀请链接查询组织信息*/
router.get('/get_linkinfo', function (req, res, next) {
    api.get_linkinfo(req, res, next)
});

/*通过公司获取邀请链接*/
router.post('/get_link', function (req, res, next) {
    api.get_link(req, res, next)
});

/*作废链接*/
router.post('/delete_linkinfo', function (req, res, next) {
    api.delete_linkinfo(req, res, next)
});

/*同意加入*/
router.post('/agree_join', function (req, res, next) {
    api.agree_join(req, res, next)
});


/*直接新增人员*/
router.post('/invitation_join', function (req, res, next) {
    api.invitation_join(req, res, next)
});

/*查询当前公司下面所有人员*/
router.post('/find_team_user', function (req, res, next) {
    api.find_team_user(req, res, next)
});

/*新增岗位*/
router.post('/add_dutiesinfo', function (req, res, next) {
    api.add_dutiesinfo(req, res, next)
});

/*新增岗位*/
router.post('/delete_dutiesinfo', function (req, res, next) {
    api.delete_dutiesinfo(req, res, next)
});
/*修改岗位*/
router.post('/update_dutiesinfo', function (req, res, next) {
    api.update_dutiesinfo(req, res, next)
});
/*查询岗位*/
router.post('/find_dutiesinfo', function (req, res, next) {
    api.find_dutiesinfo(req, res, next)
});

/*编辑组织内用户信息*/
router.post('/update_team_user', function (req, res, next) {
    api.update_team_user(req, res, next)
});
/*查询组织内自己用户信息*/
router.post('/find_userinfo', function (req, res, next) {
    api.find_userinfo(req, res, next)
});


router.params.name = "team module"
module.exports = router;